package org.javamap.overlays;

import org.javamap.*;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Stroke;

public class River extends LineOverlay
{
	public River() { setName("unnamed river"); }
	
	protected void drawOneLocation(Graphics2D g2d, Point p)
	{
		// Only one location.  Draw a large blue dot.
		g2d.fillOval(
				p.x - NODE_SIZE/2 + 2,
				p.y - NODE_SIZE/2 + 2,
				NODE_SIZE,
				NODE_SIZE
		);			
	}

	protected void drawLineSegment(Graphics2D g2d, Point oldP, Point p)
	{
		g2d.drawLine(oldP.x, oldP.y, p.x, p.y);
	}
	
	protected void setupForDraw(Graphics2D g2d)
	{
		g2d.setColor(COLOR_WATER);		
		g2d.setStroke(STROKE_RIVER);
	}		
	
	private final static BasicStroke STROKE_RIVER = new BasicStroke(
			3.0f,
			BasicStroke.CAP_ROUND,
			BasicStroke.JOIN_ROUND
	);
	private final static Color COLOR_WATER = new Color(8, 33, 107);
}

